package com.design.state.order;

// 状态接口
interface OrderState {
    void process(Order order);
}

// 具体状态类 - 待支付
class PendingPaymentState implements OrderState {
    @Override
    public void process(Order order) {
        System.out.println("Processing order with pending payment...");
        // 其他处理逻辑
    }
}

// 具体状态类 - 已支付
class PaidState implements OrderState {
    @Override
    public void process(Order order) {
        System.out.println("Processing order with paid payment...");
        // 其他处理逻辑
    }
}

// 具体状态类 - 已发货
class ShippedState implements OrderState {
    @Override
    public void process(Order order) {
        System.out.println("Processing order with shipped item...");
        // 其他处理逻辑
    }
}

// 具体状态类 - 已完成
class CompletedState implements OrderState {
    @Override
    public void process(Order order) {
        System.out.println("Processing order with completed status...");
        // 其他处理逻辑
    }
}
